package com.ruoyi.project.tool;

import net.dongliu.apk.parser.ApkFile;
import net.dongliu.apk.parser.bean.ApkMeta;

import java.io.File;

public class APKUtils {
    public static ApkMeta AnalysisAPK(String filePath) {
        try {
            File file = new File(filePath);

            if (file.exists() && file.isFile()) {
                ApkFile apkFile = new ApkFile(file);
                return apkFile.getApkMeta();
            }
        } catch (Exception e) {
            throw new RuntimeException("APK解析失败！");
        }
        return null;
    }
}
